Component({
  options: {
    addGlobalClass: true
  },
  properties: {
    value: String
  },

  methods: {
    onClickHome() {
      if (this.data.value !== 'home') {
        this.setData({
          value: 'home'
        })

        this.triggerEvent('change', 'home')
      }
    },

    onClickPersonCenter() {
      if (this.data.value !== 'personCenter') {
        this.setData({
          value: 'personCenter'
        })

        this.triggerEvent('change', 'personCenter')
      }
    }
  }
})